import { gql } from "@apollo/client";

export const getProductsByType_service = gql`
  query getProductsByType($page: PageInput!, $name: String, $type: String) {
    getProductsByType(page: $page, name: $name, type: $type) {
      message
      data {
        id
        name
        desc
        stock
        cover
        stock
        status
        sellNum
        limitBuyNum
        bannerUrl
        originPrice
        preferentialPrice
        orgId
        cards
        type
      }
      page {
        pageNum
        pageSize
        total
      }
    }
  }
`;

export const getRecommendProducts_service = gql`
  query getRecommendProducts($orgId: String!) {
    getRecommendProducts(orgId: $orgId) {
      message
      data {
        id
        name
        desc
        stock
        cover
        stock
        status
        sellNum
        limitBuyNum
        bannerUrl
        originPrice
        preferentialPrice
        orgId
        cards
        type
      }
    }
  }
`;

export const getProductInfo_service = gql`
  query getProductInfo($id: String!) {
    getProductInfo(id: $id) {
      data {
        id
        name
        desc
        stock
        sellNum
        limitBuyNum
        cover
        status
        bannerUrl
        originPrice
        preferentialPrice
        orgId
        cards
        type
      }
    }
  }
`;
